<template>
	<view class="content" @tap.stop="$refs.uniselect.close()">
        <u-navbar bgColor="#fff" :fixed="true" :safeAreaInsetTop="true" :placeholder="true"
            @leftClick="back" title="信用管理" >
            <!-- rightIcon="search" @rightClick="rightClick" -->
        </u-navbar>
        <uni-select class="uniselect" :style="{top:systemInfo.headerH+'px'}"
            ref="uniselect" bgColor="#fff" :selectData="selectData" @select="select">
        </uni-select>
        <view style="height:74rpx"></view>

        <!-- 内容 -->
        <view class="uni-area" >
            <!-- 信用统计 -->
            <view v-if="false" class="u-m-t-40 uni-shadow">
                <view class="u-flex u-row-between">
                    <text class="u-font-32 font-bold">信用统计</text>
                </view>
                <u-row class="u-flex u-flex-wrap">
                    <u-col span="3" v-for="(item,index) in creditTotals" :key="index" class="u-m-t-30">
                        <text class="u-text-center u-font-24 uni-dec-color">{{item.title}}</text>
                        <text class="u-m-t-14 u-text-center u-font-42 font-bold">{{item.value}}</text>
                    </u-col>
                </u-row>
            </view>

            <!-- 信用列表 -->
            <view class="u-m-t-50">
                <text class="u-font-32 font-bold">信用列表</text>
                <view class="u-m-t-30 uni-shadow u-flex u-row-center u-flex-col">
                    <u--image :showLoading="true" src="/static/icons/no.png" width="241rpx" height="241rpx"></u--image>
                    <view class="u-flex u-row-center">
                        <u-icon name="info-circle" size="24" class="u-m-r-20" color="#4E5C70"></u-icon>
                        <text class="u-font-32">暂无数据源</text>
                    </view>
                </view>
            </view>
        </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
                systemInfo: uni.getStorageSync('systemInfo'),
                // 下拉选择数据
				selectData:[
                    { label: "属地", list: [], show: false, type: "districtId", value: '' },
                    { label: "信用类型", list: [], show: false, type: "dwlx", value: '' },
                    { label: "信用类别", list: [], show: false, type: "dwlx", value: '' },
                ],
                // 信用统计
                creditTotals:[ 
                    { title:'单位总数', value: 0 }, // 企业总数
                    { title:'良好信用', value: 0 },
                    { title:'不良信用', value: 0 },
                    { title:'黑名单', value: 0 },
                    { title:'个数总数', value: 0 },
                    { title:'交建专户', value: 0 },
                    { title:'良好信用', value: 0 },
                    { title:'全部专户', value: 0 },
                ],
			}
		},

		onLoad() {
            // 属地
            this.$tools.getNationFn(this,{},res=>{
                this.selectData.splice(0,1,res)
            })
		},

		methods: {
            // 返回
            back(){
                uni.navigateBack()
            },
            // 搜索
            rightClick(){
                uni.navigateTo({ url: '/pages/common/search' })
            },

            // 下拉选择
            select(e){
                // console.log(e)
            }
		}
	}
</script>

<style scoped lang="scss">
    .content{
        height: 100vh;
        .uniselect{
            width: 100%;
            position: fixed !important;
            left: 0;
        }
    }
</style>
